import db from '../libs/database';
import Sequelize from 'sequelize';
import Orders from "./order";

const User = db.define('user', {
  username: {
    type: Sequelize.STRING,
    field: 'username' // Will result in an attribute that is firstName when user facing but first_name in the database
  },
  password: {
    type: Sequelize.STRING
  },
  uId: {
    type: Sequelize.STRING
  }
}, {
  freezeTableName: true // Model 对应的表名将与model名相同
});

User.sync()
// Orders.sync({force: true})


export default User
